<?php
/**
* @author moufer<moufer@163.com>
* @copyright www.modoer.com
* @version $Id 1 2008-08-29 16:35 $
*/
!defined('IN_MUDDER') && exit('Access Denied');

if(!check_submit('mysubmit')) {

    $total = $db->get_value("SELECT COUNT(*) FROM {$dbpre}shops WHERE ownerid='$user->uid'");
    if( $total > 0) {
        $offset = 10;
        $limit = get_limit($page, $offset);
        $multipage = multi($total, $offset, $page, "index.php?ac=$ac");
        $query = $db->query("SELECT * FROM {$dbpre}shops WHERE ownerid='$user->uid' ORDER BY reviews DESC LIMIT $limit");
        $myitems = array();
        if(!function_exists('itemToArray')) {
            require_once(MUDDER_ROOT.'./'.$_modules['shop']['directory'].'/include/fun_item.php');
        }
        while($row = $db->fetch_array($query)) {
            $myitems[] = itemToArray($row);
        }
    }

} else {

}
?>